In numerous applications, and in particular for internal combustion engine crankshafts and for outlet shafts from gearboxes, the rotary shafts are fitted with angular encoder devices to sense their instantaneous speed of rotation and/or angular position and/or direction of rotation. Such rotary shafts are generally fitted with dynamic seals in order to prevent any leakage of oil between the shaft and the opening in the casing through which the shaft passes. It is desired to group together the angular sensing device and the dynamic seal in order to limit the total amount of space occupied by these two elements. For example, patent EP-A-0 949 510 describes a dynamic seal fitted with an angular sensing device which comprises a sleeve secured to the rotary shaft and provided with a collar covered in a magnetizable coating. The dynamic seal proper is secured to the stationary portion and presents a lip which bears against the outside surface of the sleeve. That assembly made up of two elements requires:                either two mounting operations, thus requiring the operator to verify that the elements have been properly positioned relative to each other;        or else the use of complex tooling enabling both elements to be mounted simultaneously.        